<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>专家组管理</title>
<%@ include file="/module/js.jsp"%>
	 <script type="text/javascript">		   
		     function formaterTeacherGroup(value, row, index) {
		        return "<a href='${basePath}/teacherReviewGroup/modiftyReviewTeacherGroupForWard?groupid=" + row.groupid +"'>" + value + "</a>";
	         }
		 
			$(document).ready(
							function() {
								$('#btnAdd').click(function() {
								  document.Form.action = "${basePath}/teacherReviewGroup/addReviewTeacherGroupForward";
								  document.Form.submit();
								});
								//返回
								$('#btnBack').click(function() {
									window.location.href="${basePath}/teacherThesisAuditing/index";
									});
								
								
								//查询
								$('#btnQuery')
										.click(
												function() {
													$('#dg').datagrid('load',{
														groupname :$("#groupname").val()
													});
												});
								
								$('#btnDelete').click(function() {
						               $("#idList").val("");
										var count = 0;
										var idList = new Array();
									    var sels = $("#dg").datagrid("getSelections");
								    	for(var i in sels){
								    		idList.push(sels[i].groupid);
								    		count++;
								    	}
										
										if (count == 0) {
											layer.alert("您至少选择一条删除记录信息", {icon: 3});
											return false;
										}else{
											  layer.confirm("您是否删除当前选中数据信息", {icon: 3, title:'提示',skin:'layer-ext-moon'}, function(index){
												    $("#idList").val(idList);
												    document.Form.action = "${basePath}/teacherReviewGroup/deleteReviewTeacherGroup";
													document.Form.submit();
											  },function(index){
													layer.close(index);
											  });
										}
									});
			
		         });
			
			
		 if("${msg}"!=""){
		       layer.alert("${msg}", {icon: 6});
		 } 
				
		</script>

</head>
<body>
	<form action="#" name="Form" id="Form" method="post">
		<input type="hidden" name="idList" id="idList"/>
		<table cellpadding="1" cellspacing="1" border="0">
			<tr>
				<td><input type="button" id="btnQuery" value="查询"
					class="inputButton" /></td>
					<%--    <kl:permission permisstionList="${permisstionList}" currentUser="${_login_console_user}" currentCatalogId="<%=CatalogUtils.getCatalogId("OF_ZLTS_CLGL")%>" key="add">	 --%>
				<td><input type="button" id="btnAdd"  value="添 加 "
					class="inputButton" /></td>
					<%-- </kl:permission>
					   <kl:permission permisstionList="${permisstionList}" currentUser="${_login_console_user}" currentCatalogId="<%=CatalogUtils.getCatalogId("OF_ZLTS_CLGL")%>" key="delete">	 --%>
				<td><input type="button" id="btnDelete" value="删除"
					 class="inputButton"/></td>
					<%--  </kl:permission> --%>
			  <td><input type="button" id="btnBack" value="返回"
					 class="inputButton"/></td>
			</tr>
		</table>
	   <table cellpadding="1" cellspacing="1">
			<tr>
				<td>专家组名称：</td>
				<td><input type="text" name="groupname" id="groupname"  autocomplete="off" class="inputText2" /></td>
			</tr>
		</table>
		<br/>
        <table id="dg" class="easyui-datagrid "  style="width:73%;"
		data-options="pagination:true,collapsible:true,url:'${basePath}/teacherReviewGroup/reviewTeacherGroupList',method:'post',remoteSort:true,striped:true"> 
		<thead>
			<tr>
				<th data-options="field:'groupid',checkbox:true,width:60,align:'left'"></th>
				<th data-options="field:'groupname',sortable:true,nowrap:true,width:300,align:'left',formatter:formaterTeacherGroup">专家组名称</th>
				<th data-options="field:'membernum',sortable:true,nowrap:true,width:100,align:'left'">成员人数</th>
				<th data-options="field:'xm',sortable:false,nowrap:true,width:600,align:'left'">成员姓名</th>
			</tr>
		</thead>
	</table>
	</form>
</body>
</html>
